package com.financial.service.heemoney.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.financial.service.heemoney.utils.DateFormatHelper;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @Author: wenguoqiang
 * @Email wguoqiango@163.com
 * @Date: 2019/12/2 0002 下午 3:42
 * @Des 汇收银配置参数类
 */
@Component
public class HeemoneyConfigDTO implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 版本
     */
    private String version = "1.0";

    /**
     * 编码格式
     */
    private String charset = "utf-8";
    /**
     * 签名类型
     */
    private String sign_type = "MD5";

    /**
     * 支付模型参数
     */
    private HeemoneyApiModel heemoneyPay = new HeemoneyApiModel("https://pay.heemoney.com/v1/ApplyPay", "heemoney.pay.applypay", "https://pay.goyounglife.com/preapi/heemoneypay/financialReportHeemoney/asynReport", "http://www.baidu.com");
    /**
     * 支付查询模型参数
     */
    private HeemoneyApiModel heemoneyPayQuery = new HeemoneyApiModel("https://pay.heemoney.com/v1/payquery", "heemoney.pay.query", "http://www.baidu.com", "http://www.baidu.com");
    /**
     * 进件查询模型参数
     */
    private HeemoneyApiModel heemoneyProviderQuery = new HeemoneyApiModel("http://api.heemoney.com/v1/MerchProviderQuery", "heemoney.merch.provider.query", "http://www.baidu.com", "http://www.baidu.com");
    /**
     * 进件模型参数
     */
    private HeemoneyApiModel heemoneyProviderSubmit= new HeemoneyApiModel("http://api.heemoney.com/v1/MerchProviderSubmit", "theemoney.merch.provider.submit", "http://www.baidu.com", "http://www.baidu.com");
    /**
     * 退款模型参数
     */
    private HeemoneyApiModel heemoneyRefund = new HeemoneyApiModel("https://pay.heemoney.com/v1/payquery", "heemoney.pay.refund", "http://www.baidu.com", "http://www.baidu.com");
    /**
     * 退款查询模型参数
     */
    private HeemoneyApiModel heemoneyRefundQuery = new HeemoneyApiModel("https://pay.heemoney.com/v1/refundquery", "heemoney.pay.refund.query", "http://www.baidu.com", "http://www.baidu.com");
    /**
     * 简要注册查询模型参数
     */
    private HeemoneyApiModel heemoneyRegister = new HeemoneyApiModel("http://api.heemoney.com/v1/MerchRegister", "heemoney.merch.account.register", "http://www.baidu.com", "http://www.baidu.com");

    /**
     * 微信支付通道配置模型参数
     */
    private HeemoneyApiModel heemoneyWxPayConfig = new HeemoneyApiModel("http://api.heemoney.com/v1/MerchSetWxPayConfig", "theemoney.set.wxpay.config", "http://www.baidu.com", "http://www.baidu.com");

    /**
     * 结算模型参数（聚合分账针对微信个人账户）
     */
    private HeemoneyApiModel heemoneySettle = new HeemoneyApiModel("https://pay.heemoney.com/v1/PShard", "heemoney.pshard.multi", "http://www.baidu.com", "http://www.baidu.com");
    /**
     * 付款结算账户注册（付款分账账户注册）模型参数
     */
    private HeemoneyApiModel heemoneySplitAccout = new HeemoneyApiModel("https://pay.heemoney.com/v1/TransferThirdBindAdd", "heemoney.transfer.account.add", "http://www.baidu.com", "http://www.baidu.com");
    /**
     * 付款分账（付款分账）模型参数
     */
    private HeemoneyApiModel heemoneyPaySplit = new HeemoneyApiModel("https://pay.heemoney.com/v1/TransferSubmit", "heemoney.transfer.submit", "http://www.baidu.com", "http://www.baidu.com");
    /**
     * 付款分账查询模型参数
     */
    private HeemoneyApiModel heemoneyPaySettleQuery = new HeemoneyApiModel("https://pay.heemoney.com/v1/TransferQuery", "heemoney.transfer.query", "http://www.baidu.com", "http://www.baidu.com");

    /**
     * 结算查询参数(聚合分账)
     */
    private HeemoneyApiModel heemoneySettleQuey = new HeemoneyApiModel("https://pay.heemoney.com/v1/PShard", "heemoney.pshard.query", "http://www.baidu.com", "http://www.baidu.com");
    /**
     * 时间戳
     */
    @JsonIgnore
    private String timestamp;
    /**
     * 账户类型
     */
    private HeemoneyAccountModel heemoneyAccountType = new HeemoneyAccountModel("hyp191202420270000021397E81527B2", "4202702123131", "FD7DED5E5BC4412F915EB9B7");
    /**
     * 支付类型
     */
    private HeemoneyAccountModel heemoneyPayType = new HeemoneyAccountModel("hyp191206420270000021628C6FEA22B", "4202702120295", "638FCC506DA3416BAA553A58");
    /**
     * 付款类型
     */
    private HeemoneyAccountModel heemoneyPaymentType = new HeemoneyAccountModel("hyp1910254202700000197716C71C28D", "4202702120295", "093867AEEEA84756ADC23765");

    /**
     * 账户类型 模型结构
     */
    public class HeemoneyAccountModel {


        /**
         * 应用id
         */
        private String app_id;

        /**
         * 商户号
         */
        private String isv_mch_uid;

        /**
         * 秘钥
         */
        private String key;

        public HeemoneyAccountModel(String app_id, String isv_mch_uid, String key) {
            this.app_id = app_id;
            this.isv_mch_uid = isv_mch_uid;
            this.key = key;
        }

        public HeemoneyAccountModel() {
        }

        public String getApp_id() {
            return app_id;
        }

        public void setApp_id(String app_id) {
            this.app_id = app_id;
        }

        public String getIsv_mch_uid() {
            return isv_mch_uid;
        }

        public void setIsv_mch_uid(String isv_mch_uid) {
            this.isv_mch_uid = isv_mch_uid;
        }

        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }
    }

    /**
     * api  模型结构
     */
    public class HeemoneyApiModel {

        /**
         * 请求地址
         */
        private String request_url;
        /**
         * 函数
         */
        private String method;
        /**
         * 异步回调地址
         */
        private String notify_url;
        /**
         * 同步返回地址
         */
        private String return_url;


        public HeemoneyApiModel(String request_url, String method, String notify_url, String return_url) {
            this.request_url = request_url;
            this.method = method;
            this.notify_url = notify_url;
            this.return_url = return_url;
        }

        public HeemoneyApiModel() {
        }

        public String getMethod() {
            return method;
        }

        public void setMethod(String method) {
            this.method = method;
        }

        public String getNotify_url() {
            return notify_url;
        }

        public void setNotify_url(String notify_url) {
            this.notify_url = notify_url;
        }

        public String getReturn_url() {
            return return_url;
        }

        public void setReturn_url(String return_url) {
            this.return_url = return_url;
        }

        public String getRequest_url() {
            return request_url;
        }

        public void setRequest_url(String request_url) {
            this.request_url = request_url;
        }
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getCharset() {
        return charset;
    }

    public void setCharset(String charset) {
        this.charset = charset;
    }

    public String getSign_type() {
        return sign_type;
    }

    public void setSign_type(String sign_type) {
        this.sign_type = sign_type;
    }

    public HeemoneyApiModel getHeemoneyPay() {
        return heemoneyPay;
    }

    public void setHeemoneyPay(HeemoneyApiModel heemoneyPay) {
        this.heemoneyPay = heemoneyPay;
    }

    public HeemoneyApiModel getHeemoneyPayQuery() {
        return heemoneyPayQuery;
    }

    public void setHeemoneyPayQuery(HeemoneyApiModel heemoneyPayQuery) {
        this.heemoneyPayQuery = heemoneyPayQuery;
    }

    public HeemoneyApiModel getHeemoneyProviderQuery() {
        return heemoneyProviderQuery;
    }

    public void setHeemoneyProviderQuery(HeemoneyApiModel heemoneyProviderQuery) {
        this.heemoneyProviderQuery = heemoneyProviderQuery;
    }

    public HeemoneyApiModel getHeemoneyWxPayConfig() {
        return heemoneyWxPayConfig;
    }

    public void setHeemoneyWxPayConfig(HeemoneyApiModel heemoneyWxPayConfig) {
        this.heemoneyWxPayConfig = heemoneyWxPayConfig;
    }

    public HeemoneyApiModel getHeemoneyProviderSubmit() {
        return heemoneyProviderSubmit;
    }

    public void setHeemoneyProviderSubmit(HeemoneyApiModel heemoneyProviderSubmit) {
        this.heemoneyProviderSubmit = heemoneyProviderSubmit;
    }

    public HeemoneyApiModel getHeemoneyRefund() {
        return heemoneyRefund;
    }

    public void setHeemoneyRefund(HeemoneyApiModel heemoneyRefund) {
        this.heemoneyRefund = heemoneyRefund;
    }

    public HeemoneyApiModel getHeemoneyRefundQuery() {
        return heemoneyRefundQuery;
    }

    public void setHeemoneyRefundQuery(HeemoneyApiModel heemoneyRefundQuery) {
        this.heemoneyRefundQuery = heemoneyRefundQuery;
    }

    public HeemoneyApiModel getHeemoneyRegister() {
        return heemoneyRegister;
    }

    public void setHeemoneyRegister(HeemoneyApiModel heemoneyRegister) {
        this.heemoneyRegister = heemoneyRegister;
    }

    public HeemoneyApiModel getHeemoneySettle() {
        return heemoneySettle;
    }

    public void setHeemoneySettle(HeemoneyApiModel heemoneySettle) {
        this.heemoneySettle = heemoneySettle;
    }

    public HeemoneyApiModel getHeemoneySettleQuey() {
        return heemoneySettleQuey;
    }

    public void setHeemoneySettleQuey(HeemoneyApiModel heemoneySettleQuey) {
        this.heemoneySettleQuey = heemoneySettleQuey;
    }

    public String getTimestamp() {
        return DateFormatHelper.getNowTimeStr("yyyyMMddHHmmss");
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public HeemoneyAccountModel getHeemoneyAccountType() {
        return heemoneyAccountType;
    }

    public void setHeemoneyAccountType(HeemoneyAccountModel heemoneyAccountType) {
        this.heemoneyAccountType = heemoneyAccountType;
    }

    public HeemoneyAccountModel getHeemoneyPayType() {
        return heemoneyPayType;
    }

    public void setHeemoneyPayType(HeemoneyAccountModel heemoneyPayType) {
        this.heemoneyPayType = heemoneyPayType;
    }

    public HeemoneyAccountModel getHeemoneyPaymentType() {
        return heemoneyPaymentType;
    }

    public void setHeemoneyPaymentType(HeemoneyAccountModel heemoneyPaymentType) {
        this.heemoneyPaymentType = heemoneyPaymentType;
    }

    public HeemoneyApiModel getHeemoneySplitAccout() {
        return heemoneySplitAccout;
    }

    public void setHeemoneySplitAccout(HeemoneyApiModel heemoneySplitAccout) {
        this.heemoneySplitAccout = heemoneySplitAccout;
    }

    public HeemoneyApiModel getHeemoneyPaySplit() {
        return heemoneyPaySplit;
    }

    public void setHeemoneyPaySplit(HeemoneyApiModel heemoneyPaySplit) {
        this.heemoneyPaySplit = heemoneyPaySplit;
    }

    public HeemoneyApiModel getHeemoneyPaySettleQuery() {
        return heemoneyPaySettleQuery;
    }

    public void setHeemoneyPaySettleQuery(HeemoneyApiModel heemoneyPaySettleQuery) {
        this.heemoneyPaySettleQuery = heemoneyPaySettleQuery;
    }
}
